package study.springcloud.provider.controller;

import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.eggs.result.Result;
import study.eggs.result.Results;

import java.util.Map;

@Slf4j
@RestController
public class EchoController {

    @RequestMapping("/echo")
    public Result echo() {
        log.info(">>>>>> echo echo echo");
        Map<String, Object> data = Maps.newHashMap();
        data.put("message", "this is echo");
        return Results.ok(data);
    }
}
